﻿@{
    Layout = "~/_SiteLayout.cshtml";
    Page.Title = "Test Ex Page";
    
    if (IsPost)
    {
        if (Request.Form["action_button"] == "404")
        {
            throw new HttpException(404, "file not found");
        }
            
        
        if (Request.Form["action_button"] == "500")
        {
            throw new HttpException(500, "some internal server 500 error");
        }
        
        throw new NotImplementedException("AAAA");
    }
}

<div class="container-fluid main-content" role="main">

    <h2>
        Test Exception
    </h2>
    
    <div class="panel panel-default">
        <div class="panel-heading">Instructions</div>
        <div class="panel-body">

            <p>
                Click on any of the buttons below to trigger the respective exception.<br />
            </p>

        </div>
    </div>

    <form method="post">
        
        <div>
            <p>
                <button type="submit" name="action_button" value="404" class="btn btn-primary"><span class="glyphicon glyphicon-bullhorn" aria-hidden="true"></span> HTTP 404</button><br />
            </p>
            <p>
                <button type="submit" name="action_button" value="500" class="btn btn-primary"><span class="glyphicon glyphicon-bullhorn" aria-hidden="true"></span> HTTP 500</button><br />
            </p>
        </div>

    </form>

    @if (IsPost)
    {
        <p>Is post; Display post variables</p>
    }
</div>

@section Scripts
{
    <script type="text/javascript" src="~/Scripts/kendo/2014.3.1119/kendo.ui.core.min.js"></script>
    <script type="text/javascript" src="~/Scripts/moment.js"></script>
    <script type="text/javascript" src="~/Scripts/moment-with-locales.js"></script>
    <script type="text/javascript">
    (function ($) {
        "use strict";
        $(document).ready(function () {
        });

    }(jQuery));

    </script>
}